<!--[if ie 6]>
      <style type="text/css">
      div#content div.buttonMinibox{width:200px;display:inline;float:none;overflow: hidden;}
      div#content div.buttonBox{width:600px;height:30px;}
      </style>
<![endif]-->

<?php
	echo $accessibility->whereIAm($pageTitle,array(array('title'=>'Grupos de Permissões','link'=>'/groups'),array('title'=>'Visualizar grupo')));
	echo $this->renderElement('message');	
	echo "<h2 id='contentTitle'>".$pageTitle."</h2>";
	echo "<div id='view'>";
	//echo "<p><label>ID:</label><span>".$group['Group']['id']."</span></p>";
	echo "<p><label>Nome:</label><span>".$group['Group']['name']."</span></p>";
	echo "<p><label>Nível:</label><span>".$group['Group']['level']."</span></p>";
	echo "<p><label>Redirect:</label><span>".$group['Group']['redirect']."</span></p>";
	echo "<p><label>Tipo:</label><span>".$group['Group']['perm_type']."</span></p>";
	echo "<p><label>Criado em:</label><span>".$group['Group']['created']."</span></p>";
	echo "<p><label>Modificado em:</label><span>".$group['Group']['modified']."</span></p>";
	echo "<br />";
	
	/* Botoes - Inicio */
	$entity = 'groups';
	$model = 'Group';
	$label = 'grupo';
	$label_plural = 'grupos';
	
	echo "<div class='buttonBox'>";
	echo "<div class='buttonMinibox'>";
	$listButton = "<span class=\"buttonList\">Listar ".$label_plural."</span>";
	echo html_entity_decode($html->link($listButton, '/'.$entity.'/',array('class'=>'button')));
	echo "</div>";
	echo "<div class='buttonMinibox'>";
	if ($othAuth->hasPermission($entity.'/edit/')) {
		$editButton = "<span class=\"buttonEdit\">Editar ".$label."</span>";
		echo html_entity_decode($html->link($editButton, '/'.$entity.'/edit/'.$group[$model]['id'],array('class'=>'button')));
	}
	echo "</div>";
	echo "<div class='buttonMinibox'>";
	if ($othAuth->hasPermission($entity.'/delete/')) {
		$deleteButton = "<span class=\"buttonDelete\">Apagar ".$label."</span>";
		echo html_entity_decode($html->link($deleteButton,'/'.$entity.'/delete/'.$group[$model]['id'], array('class'=>'button'), 'Confirma a exclusão deste item?'));
	}
	echo "</div>";
	echo "</div>";
	/* Botoes - Fim */
	
	echo "</div>";
